需要安装 Java 8 环境
环境检查
1 | $ cat /etc/redhat-release |
安装
1 | $ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip |
进入解压目录1
$ cd elasticsearch-5.5.1/
启动elasticsearch1
$ ./bin/elasticsearch
启动错误提示
1、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]1
$ sysctl -w vm.max_map_count=262144
2、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
1 | $ vi /etc/security/limits.conf |
默认情况下只能本机访问,远程访问需要修改
安装目录下config/elasticsearch.yml文件
去掉network.host 注释,将值改成0.0.0.01
network.host: 0.0.0.0
Elasticsearch head客户端连接失败1
2
3
4#查看firewalld 状态
$ systemctl status firewalld
#关闭 firewalld
$ service firewalld stop
关闭firewalld客户端连接成功